Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format local dates instead of converting a second time #568

Merged
merged 2 commits into from
Sep 29, 2020

Conversation

iandunn
Copy link
Member

@iandunn iandunn commented Sep 8, 2020

This shouldn't be merged until we install the version of Gutenberg that includes both WordPress/gutenberg#25083 and WordPress/gutenberg#22866.


Fixes #559

The dates are already in the site timezone, so dateI18n() et al add the UTC offset a second time. In some cases that would cross a date boundary, and the wrong date would be displayed.

@iandunn iandunn added [Type] Bug [Status] Blocked [Component] Blocks All custom blocks (Speakers, CrowdCast, Live Schedule, etc) labels Sep 8, 2020
@iandunn iandunn self-assigned this Sep 8, 2020
Copy link
Contributor

@ryelle ryelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good 👍

One docs suggestion, otherwise good to merge.

These dates are _already_ in the site timezone, so `dateI18n()` et al would add the UTC offset a _second_ time. In some cases that would cross a date boundary, and the wrong date would be displayed.

Fixes #559
@iandunn iandunn force-pushed the schedule-heading-yesterday branch from 8aecd15 to dea066c Compare September 29, 2020 12:47
@iandunn iandunn merged commit 17d33ef into production Sep 29, 2020
@iandunn iandunn deleted the schedule-heading-yesterday branch September 29, 2020 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Blocks All custom blocks (Speakers, CrowdCast, Live Schedule, etc) [Type] Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schedule block shows dates 1 day in the past
2 participants